package com.entity;

import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;

public class OrderinfoExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    private Integer limit;

    private Integer offset;

    public OrderinfoExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setLimit(Integer limit) {
        this.limit = limit;
    }

    public Integer getLimit() {
        return limit;
    }

    public void setOffset(Integer offset) {
        this.offset = offset;
    }

    public Integer getOffset() {
        return offset;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        protected void addCriterionForJDBCDate(String condition, Date value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value.getTime()), property);
        }

        protected void addCriterionForJDBCDate(String condition, List<Date> values, String property) {
            if (values == null || values.size() == 0) {
                throw new RuntimeException("Value list for " + property + " cannot be null or empty");
            }
            List<java.sql.Date> dateList = new ArrayList<java.sql.Date>();
            Iterator<Date> iter = values.iterator();
            while (iter.hasNext()) {
                dateList.add(new java.sql.Date(iter.next().getTime()));
            }
            addCriterion(condition, dateList, property);
        }

        protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property);
        }

        public Criteria andOridIsNull() {
            addCriterion("orid is null");
            return (Criteria) this;
        }

        public Criteria andOridIsNotNull() {
            addCriterion("orid is not null");
            return (Criteria) this;
        }

        public Criteria andOridEqualTo(Integer value) {
            addCriterion("orid =", value, "orid");
            return (Criteria) this;
        }

        public Criteria andOridNotEqualTo(Integer value) {
            addCriterion("orid <>", value, "orid");
            return (Criteria) this;
        }

        public Criteria andOridGreaterThan(Integer value) {
            addCriterion("orid >", value, "orid");
            return (Criteria) this;
        }

        public Criteria andOridGreaterThanOrEqualTo(Integer value) {
            addCriterion("orid >=", value, "orid");
            return (Criteria) this;
        }

        public Criteria andOridLessThan(Integer value) {
            addCriterion("orid <", value, "orid");
            return (Criteria) this;
        }

        public Criteria andOridLessThanOrEqualTo(Integer value) {
            addCriterion("orid <=", value, "orid");
            return (Criteria) this;
        }

        public Criteria andOridIn(List<Integer> values) {
            addCriterion("orid in", values, "orid");
            return (Criteria) this;
        }

        public Criteria andOridNotIn(List<Integer> values) {
            addCriterion("orid not in", values, "orid");
            return (Criteria) this;
        }

        public Criteria andOridBetween(Integer value1, Integer value2) {
            addCriterion("orid between", value1, value2, "orid");
            return (Criteria) this;
        }

        public Criteria andOridNotBetween(Integer value1, Integer value2) {
            addCriterion("orid not between", value1, value2, "orid");
            return (Criteria) this;
        }

        public Criteria andShidIsNull() {
            addCriterion("shid is null");
            return (Criteria) this;
        }

        public Criteria andShidIsNotNull() {
            addCriterion("shid is not null");
            return (Criteria) this;
        }

        public Criteria andShidEqualTo(String value) {
            addCriterion("shid =", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotEqualTo(String value) {
            addCriterion("shid <>", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidGreaterThan(String value) {
            addCriterion("shid >", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidGreaterThanOrEqualTo(String value) {
            addCriterion("shid >=", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidLessThan(String value) {
            addCriterion("shid <", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidLessThanOrEqualTo(String value) {
            addCriterion("shid <=", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidLike(String value) {
            addCriterion("shid like", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotLike(String value) {
            addCriterion("shid not like", value, "shid");
            return (Criteria) this;
        }

        public Criteria andShidIn(List<String> values) {
            addCriterion("shid in", values, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotIn(List<String> values) {
            addCriterion("shid not in", values, "shid");
            return (Criteria) this;
        }

        public Criteria andShidBetween(String value1, String value2) {
            addCriterion("shid between", value1, value2, "shid");
            return (Criteria) this;
        }

        public Criteria andShidNotBetween(String value1, String value2) {
            addCriterion("shid not between", value1, value2, "shid");
            return (Criteria) this;
        }

        public Criteria andBuidIsNull() {
            addCriterion("buid is null");
            return (Criteria) this;
        }

        public Criteria andBuidIsNotNull() {
            addCriterion("buid is not null");
            return (Criteria) this;
        }

        public Criteria andBuidEqualTo(String value) {
            addCriterion("buid =", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidNotEqualTo(String value) {
            addCriterion("buid <>", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidGreaterThan(String value) {
            addCriterion("buid >", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidGreaterThanOrEqualTo(String value) {
            addCriterion("buid >=", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidLessThan(String value) {
            addCriterion("buid <", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidLessThanOrEqualTo(String value) {
            addCriterion("buid <=", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidLike(String value) {
            addCriterion("buid like", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidNotLike(String value) {
            addCriterion("buid not like", value, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidIn(List<String> values) {
            addCriterion("buid in", values, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidNotIn(List<String> values) {
            addCriterion("buid not in", values, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidBetween(String value1, String value2) {
            addCriterion("buid between", value1, value2, "buid");
            return (Criteria) this;
        }

        public Criteria andBuidNotBetween(String value1, String value2) {
            addCriterion("buid not between", value1, value2, "buid");
            return (Criteria) this;
        }

        public Criteria andOrtimeIsNull() {
            addCriterion("ortime is null");
            return (Criteria) this;
        }

        public Criteria andOrtimeIsNotNull() {
            addCriterion("ortime is not null");
            return (Criteria) this;
        }

        public Criteria andOrtimeEqualTo(Date value) {
            addCriterionForJDBCDate("ortime =", value, "ortime");
            return (Criteria) this;
        }

        public Criteria andOrtimeNotEqualTo(Date value) {
            addCriterionForJDBCDate("ortime <>", value, "ortime");
            return (Criteria) this;
        }

        public Criteria andOrtimeGreaterThan(Date value) {
            addCriterionForJDBCDate("ortime >", value, "ortime");
            return (Criteria) this;
        }

        public Criteria andOrtimeGreaterThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("ortime >=", value, "ortime");
            return (Criteria) this;
        }

        public Criteria andOrtimeLessThan(Date value) {
            addCriterionForJDBCDate("ortime <", value, "ortime");
            return (Criteria) this;
        }

        public Criteria andOrtimeLessThanOrEqualTo(Date value) {
            addCriterionForJDBCDate("ortime <=", value, "ortime");
            return (Criteria) this;
        }

        public Criteria andOrtimeIn(List<Date> values) {
            addCriterionForJDBCDate("ortime in", values, "ortime");
            return (Criteria) this;
        }

        public Criteria andOrtimeNotIn(List<Date> values) {
            addCriterionForJDBCDate("ortime not in", values, "ortime");
            return (Criteria) this;
        }

        public Criteria andOrtimeBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("ortime between", value1, value2, "ortime");
            return (Criteria) this;
        }

        public Criteria andOrtimeNotBetween(Date value1, Date value2) {
            addCriterionForJDBCDate("ortime not between", value1, value2, "ortime");
            return (Criteria) this;
        }

        public Criteria andOrcountIsNull() {
            addCriterion("orcount is null");
            return (Criteria) this;
        }

        public Criteria andOrcountIsNotNull() {
            addCriterion("orcount is not null");
            return (Criteria) this;
        }

        public Criteria andOrcountEqualTo(Integer value) {
            addCriterion("orcount =", value, "orcount");
            return (Criteria) this;
        }

        public Criteria andOrcountNotEqualTo(Integer value) {
            addCriterion("orcount <>", value, "orcount");
            return (Criteria) this;
        }

        public Criteria andOrcountGreaterThan(Integer value) {
            addCriterion("orcount >", value, "orcount");
            return (Criteria) this;
        }

        public Criteria andOrcountGreaterThanOrEqualTo(Integer value) {
            addCriterion("orcount >=", value, "orcount");
            return (Criteria) this;
        }

        public Criteria andOrcountLessThan(Integer value) {
            addCriterion("orcount <", value, "orcount");
            return (Criteria) this;
        }

        public Criteria andOrcountLessThanOrEqualTo(Integer value) {
            addCriterion("orcount <=", value, "orcount");
            return (Criteria) this;
        }

        public Criteria andOrcountIn(List<Integer> values) {
            addCriterion("orcount in", values, "orcount");
            return (Criteria) this;
        }

        public Criteria andOrcountNotIn(List<Integer> values) {
            addCriterion("orcount not in", values, "orcount");
            return (Criteria) this;
        }

        public Criteria andOrcountBetween(Integer value1, Integer value2) {
            addCriterion("orcount between", value1, value2, "orcount");
            return (Criteria) this;
        }

        public Criteria andOrcountNotBetween(Integer value1, Integer value2) {
            addCriterion("orcount not between", value1, value2, "orcount");
            return (Criteria) this;
        }

        public Criteria andOrsumIsNull() {
            addCriterion("orsum is null");
            return (Criteria) this;
        }

        public Criteria andOrsumIsNotNull() {
            addCriterion("orsum is not null");
            return (Criteria) this;
        }

        public Criteria andOrsumEqualTo(Integer value) {
            addCriterion("orsum =", value, "orsum");
            return (Criteria) this;
        }

        public Criteria andOrsumNotEqualTo(Integer value) {
            addCriterion("orsum <>", value, "orsum");
            return (Criteria) this;
        }

        public Criteria andOrsumGreaterThan(Integer value) {
            addCriterion("orsum >", value, "orsum");
            return (Criteria) this;
        }

        public Criteria andOrsumGreaterThanOrEqualTo(Integer value) {
            addCriterion("orsum >=", value, "orsum");
            return (Criteria) this;
        }

        public Criteria andOrsumLessThan(Integer value) {
            addCriterion("orsum <", value, "orsum");
            return (Criteria) this;
        }

        public Criteria andOrsumLessThanOrEqualTo(Integer value) {
            addCriterion("orsum <=", value, "orsum");
            return (Criteria) this;
        }

        public Criteria andOrsumIn(List<Integer> values) {
            addCriterion("orsum in", values, "orsum");
            return (Criteria) this;
        }

        public Criteria andOrsumNotIn(List<Integer> values) {
            addCriterion("orsum not in", values, "orsum");
            return (Criteria) this;
        }

        public Criteria andOrsumBetween(Integer value1, Integer value2) {
            addCriterion("orsum between", value1, value2, "orsum");
            return (Criteria) this;
        }

        public Criteria andOrsumNotBetween(Integer value1, Integer value2) {
            addCriterion("orsum not between", value1, value2, "orsum");
            return (Criteria) this;
        }

        public Criteria andOrstateIsNull() {
            addCriterion("orstate is null");
            return (Criteria) this;
        }

        public Criteria andOrstateIsNotNull() {
            addCriterion("orstate is not null");
            return (Criteria) this;
        }

        public Criteria andOrstateEqualTo(Integer value) {
            addCriterion("orstate =", value, "orstate");
            return (Criteria) this;
        }

        public Criteria andOrstateNotEqualTo(Integer value) {
            addCriterion("orstate <>", value, "orstate");
            return (Criteria) this;
        }

        public Criteria andOrstateGreaterThan(Integer value) {
            addCriterion("orstate >", value, "orstate");
            return (Criteria) this;
        }

        public Criteria andOrstateGreaterThanOrEqualTo(Integer value) {
            addCriterion("orstate >=", value, "orstate");
            return (Criteria) this;
        }

        public Criteria andOrstateLessThan(Integer value) {
            addCriterion("orstate <", value, "orstate");
            return (Criteria) this;
        }

        public Criteria andOrstateLessThanOrEqualTo(Integer value) {
            addCriterion("orstate <=", value, "orstate");
            return (Criteria) this;
        }

        public Criteria andOrstateIn(List<Integer> values) {
            addCriterion("orstate in", values, "orstate");
            return (Criteria) this;
        }

        public Criteria andOrstateNotIn(List<Integer> values) {
            addCriterion("orstate not in", values, "orstate");
            return (Criteria) this;
        }

        public Criteria andOrstateBetween(Integer value1, Integer value2) {
            addCriterion("orstate between", value1, value2, "orstate");
            return (Criteria) this;
        }

        public Criteria andOrstateNotBetween(Integer value1, Integer value2) {
            addCriterion("orstate not between", value1, value2, "orstate");
            return (Criteria) this;
        }
    }

    /**
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}